<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title>8.2 Groovy Server Pages 3.2.11</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" href="../css/main.css" type="text/css" media="screen, print" title="Style" charset="utf-8"/>
    <link rel="stylesheet" href="../css/pdf.css" type="text/css" media="print" title="PDF" charset="utf-8"/>
    <script type="text/javascript">
function addJsClass() {
    var classes = document.body.className.split(" ");
    classes.push("js");
    document.body.className = classes.join(" ");
}
    </script>
</head>

<body class="body" onload="addJsClass();">
<div id="navigation">
    <div class="navTitle">
        
        The Grails Framework
    </div>
    <div class="navLinks">
        <ul>
            <li>
                <div id="nav-summary" onmouseover="toggleNavSummary(false)" onmouseout="toggleNavSummary(true)">
                    <a href="../../guide/index.html" class="button">Table of contents</a>

                    <div id="nav-summary-childs" style="display:none;">
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/introduction.html"><strong>1</strong><span>Introduction</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/gettingStarted.html"><strong>2</strong><span>Getting Started</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/upgrading.html"><strong>3</strong><span>Upgrading</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/conf.html"><strong>4</strong><span>Configuration</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/commandLine.html"><strong>5</strong><span>The Command Line</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/profiles.html"><strong>6</strong><span>Application Profiles</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/GORM.html"><strong>7</strong><span>Object Relational Mapping (GORM)</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/theWebLayer.html"><strong>8</strong><span>The Web Layer</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/traits.html"><strong>9</strong><span>Traits</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/webServices.html"><strong>10</strong><span>Web Services</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/async.html"><strong>11</strong><span>Asynchronous Programming</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/validation.html"><strong>12</strong><span>Validation</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/services.html"><strong>13</strong><span>The Service Layer</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/staticTypeCheckingAndCompilation.html"><strong>14</strong><span>Static Type Checking And Compilation</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/testing.html"><strong>15</strong><span>Testing</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/i18n.html"><strong>16</strong><span>Internationalization</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/security.html"><strong>17</strong><span>Security</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/plugins.html"><strong>18</strong><span>Plugins</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/spring.html"><strong>19</strong><span>Grails and Spring</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/hibernate.html"><strong>20</strong><span>Grails and Hibernate</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/scaffolding.html"><strong>21</strong><span>Scaffolding</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/deployment.html"><strong>22</strong><span>Deployment</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/contributing.html"><strong>23</strong><span>Contributing to Grails</span></a>
                        </div>
                        
                    </div>
                </div>
            </li>
            <li class="separator selected">
                <a id="ref-button" onclick="localToggle(); return false;" href="#">Quick Reference</a>
            </li>
        </ul>
    </div>


</div>

<table id="colset" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td id="col1">
            <div id="main" class="corner-all">

                
                    <div class="toc-item prev-left"><a href="../../guide/GORM.html">&lt;&lt; <strong>7</strong><span>Object Relational Mapping (GORM)</span></a></div>
                

                <span id='toggle-col1' class="toggle">(<a href="#" onclick="localToggle(); return false;">Quick Reference</a>)</span>

                
                    <div class="toc-item next-right"><a href="../../guide/traits.html"><strong>9</strong><span>Traits</span> >></a></div>
                


                <div class="project">
                    <h1>8.2 Groovy Server Pages</h1>

                    <p><strong>Version:</strong> 3.2.11</p>
                </div>

                
                <div id="table-of-content">
                    <h2>Table of Contents</h2>
                    
                    <div class="toc-item" style="margin-left:0px"><a href="#GSPBasics"><strong>8.1</strong><span>GSP Basics</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:10px"><a href="#variablesAndScopes"><strong>8.1.1</strong><span>Variables and Scopes</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:10px"><a href="#logicAndIteration"><strong>8.1.2</strong><span>Logic and Iteration</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:10px"><a href="#pageDirectives"><strong>8.1.3</strong><span>Page Directives</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:10px"><a href="#expressions"><strong>8.1.4</strong><span>Expressions</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:0px"><a href="#tags"><strong>8.2</strong><span>GSP Tags</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:10px"><a href="#tagVariablesAndScopes"><strong>8.2.1</strong><span>Variables and Scopes</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:10px"><a href="#tagLogicAndIteration"><strong>8.2.2</strong><span>Logic and Iteration</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:10px"><a href="#searchAndFiltering"><strong>8.2.3</strong><span>Search and Filtering</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:10px"><a href="#linksAndResources"><strong>8.2.4</strong><span>Links and Resources</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:10px"><a href="#formsAndFields"><strong>8.2.5</strong><span>Forms and Fields</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:10px"><a href="#tagsAsMethodCalls"><strong>8.2.6</strong><span>Tags as Method Calls</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:0px"><a href="#viewsAndTemplates"><strong>8.3</strong><span>Views and Templates</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:0px"><a href="#layouts"><strong>8.4</strong><span>Layouts with Sitemesh</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:0px"><a href="#resources"><strong>8.5</strong><span>Static Resources</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:0px"><a href="#sitemeshContentBlocks"><strong>8.6</strong><span>Sitemesh Content Blocks</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:0px"><a href="#makingChangesToADeployedApplication"><strong>8.7</strong><span>Making Changes to a Deployed Application</span></a>
                    </div>
                    
                    <div class="toc-item" style="margin-left:0px"><a href="#GSPDebugging"><strong>8.8</strong><span>GSP Debugging</span></a>
                    </div>
                    
                </div>
                

                
<a name="7.2 Groovy Server Pages"><!-- Legacy link --></a>
<h2 id="gsp">8.2 Groovy Server Pages</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>Groovy Servers Pages (or GSP for short) is Grails' view technology. It is designed to be familiar for users of technologies such as ASP and JSP, but to be far more flexible and intuitive.</p>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
Although GSP can render any format, not just HTML, it is more designed around rendering markup. If you are looking for a way to simplify JSON responses take a look at <a href="webServices.html#jsonViews">JSON Views</a>.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>GSPs live in the <code>grails-app/views</code> directory and are typically rendered automatically (by convention) or with the <a href="../ref/Controllers/render.html">render</a> method such as:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">render(<span class="key">view</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">index</span><span class="delimiter">&quot;</span></span>)</code></pre>
</div>
</div>
<div class="paragraph">
<p>A GSP is typically a mix of mark-up and GSP tags which aid in view rendering.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
Although it is possible to have Groovy logic embedded in your GSP and doing this will be covered in this document, the practice is strongly discouraged. Mixing mark-up and code is a <strong>bad</strong> thing and most GSP pages contain no code and needn&#8217;t do so.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>A GSP typically has a "model" which is a set of variables that are used for view rendering. The model is passed to the GSP view from a controller. For example consider the following controller action:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">def</span> <span class="function">show</span>() {
    [<span class="key">book</span>: <span class="predefined-type">Book</span>.get(params.id)]
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>This action will look up a <code>Book</code> instance and create a model that contains a key called <code>book</code>. This key can then be referenced within the GSP view using the name <code>book</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="error">$</span>{book.title}</code></pre>
</div>
</div>
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
Embedding data received from user input has the risk of making your application vulnerable to an Cross Site Scripting (XSS) attack. Please read the documentation on <a href="security.html#xssPrevention">XSS prevention</a> for information on how to prevent XSS attacks.
</td>
</tr>
</table>
</div>

<a name="7.2.1 GSP Basics"><!-- Legacy link --></a>
<h2 id="GSPBasics">8.2.1 GSP Basics</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/GSPBasics.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>In the next view sections we&#8217;ll go through the basics of GSP and what is available to you. First off let&#8217;s cover some basic syntax that users of JSP and ASP should be familiar with.</p>
</div>
<div class="paragraph">
<p>GSP supports the usage of <code>&lt;% %&gt;</code> scriptlet blocks to embed Groovy code (again this is discouraged):</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;html&gt;</span>
   <span class="tag">&lt;body&gt;</span>
     <span class="error">&lt;</span>% out <span class="error">&lt;</span><span class="error">&lt;</span> &quot;Hello GSP!&quot; %<span class="error">&gt;</span>
   <span class="tag">&lt;/body&gt;</span>
<span class="tag">&lt;/html&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>You can also use the <code>&lt;%= %&gt;</code> syntax to output values:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;html&gt;</span>
   <span class="tag">&lt;body&gt;</span>
     <span class="error">&lt;</span>%=&quot;Hello GSP!&quot; %<span class="error">&gt;</span>
   <span class="tag">&lt;/body&gt;</span>
<span class="tag">&lt;/html&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>GSP also supports JSP-style server-side comments (which are not rendered in the HTML response) as the following example demonstrates:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;html&gt;</span>
   <span class="tag">&lt;body&gt;</span>
     <span class="error">&lt;</span>%-- This is my comment --%<span class="error">&gt;</span>
     <span class="error">&lt;</span>%=&quot;Hello GSP!&quot; %<span class="error">&gt;</span>
   <span class="tag">&lt;/body&gt;</span>
<span class="tag">&lt;/html&gt;</span></code></pre>
</div>
</div>
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
Embedding data received from user input has the risk of making your application vulnerable to an Cross Site Scripting (XSS) attack. Please read the documentation on <a href="security.html#xssPrevention">XSS prevention</a> for information on how to prevent XSS attacks.
</td>
</tr>
</table>
</div>

<a name="6.6.3 Variables and Scopes"><!-- Legacy link --></a>
<h2 id="variablesAndScopes">8.2.1.1 Variables and Scopes</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/GSPBasics/variablesAndScopes.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>Within the <code>&lt;% %&gt;</code> brackets you can declare variables:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="error">&lt;</span>% now = new Date() %<span class="error">&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>and then access those variables later in the page:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="error">&lt;</span>%=now%<span class="error">&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Within the scope of a GSP there are a number of pre-defined variables, including:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>application</code> - The <a href="https://docs.oracle.com/javaee/7/api/javax/servlet/ServletContext.html">ServletContext</a> instance</p>
</li>
<li>
<p><code>applicationContext</code> The Spring <a href="https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/ApplicationContext.html">ApplicationContext</a> instance</p>
</li>
<li>
<p><code>flash</code> - The <a href="../ref/Controllers/flash.html">flash</a> object</p>
</li>
<li>
<p><code>grailsApplication</code> - The <a href="http://docs.grails.org/3.2.11/api/grails/core/GrailsApplication.html">GrailsApplication</a> instance</p>
</li>
<li>
<p><code>out</code> - The response writer for writing to the output stream</p>
</li>
<li>
<p><code>params</code> - The <a href="../ref/Controllers/params.html">params</a> object for retrieving request parameters</p>
</li>
<li>
<p><code>request</code> - The <a href="https://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletRequest.html">HttpServletRequest</a> instance</p>
</li>
<li>
<p><code>response</code> - The <a href="https://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletResponse.html">HttpServletResponse</a> instance</p>
</li>
<li>
<p><code>session</code> - <a href="https://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpSession.html">HttpSession</a> instance</p>
</li>
<li>
<p><code>webRequest</code> - The <a href="http://docs.grails.org/3.2.11/api/org/grails/web/servlet/mvc/GrailsWebRequest.html">GrailsWebRequest</a> instance</p>
</li>
</ul>
</div>

<a name="7.2.2.2 Logic and Iteration"><!-- Legacy link --></a>
<h2 id="logicAndIteration">8.2.1.2 Logic and Iteration</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/GSPBasics/logicAndIteration.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>Using the <code>&lt;% %&gt;</code> syntax you can embed loops and so on using this syntax:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;html&gt;</span>
   <span class="tag">&lt;body&gt;</span>
      <span class="error">&lt;</span>% [1,2,3,4].each { num -<span class="error">&gt;</span> %<span class="error">&gt;</span>
         <span class="tag">&lt;p&gt;</span><span class="error">&lt;</span>%=&quot;Hello ${num}!&quot; %<span class="error">&gt;</span><span class="tag">&lt;/p&gt;</span>
      <span class="error">&lt;</span>%}%<span class="error">&gt;</span>
   <span class="tag">&lt;/body&gt;</span>
<span class="tag">&lt;/html&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>As well as logical branching:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;html&gt;</span>
   <span class="tag">&lt;body&gt;</span>
      <span class="error">&lt;</span>% if (params.hello == 'true')%<span class="error">&gt;</span>
      <span class="error">&lt;</span>%=&quot;Hello!&quot;%<span class="error">&gt;</span>
      <span class="error">&lt;</span>% else %<span class="error">&gt;</span>
      <span class="error">&lt;</span>%=&quot;Goodbye!&quot;%<span class="error">&gt;</span>
   <span class="tag">&lt;/body&gt;</span>
<span class="tag">&lt;/html&gt;</span></code></pre>
</div>
</div>

<a name="7.2.1.3 Page Directives"><!-- Legacy link --></a>
<h2 id="pageDirectives">8.2.1.3 Page Directives</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/GSPBasics/pageDirectives.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>GSP also supports a few JSP-style page directives.</p>
</div>
<div class="paragraph">
<p>The import directive lets you import classes into the page. However, it is rarely needed due to Groovy&#8217;s default imports and <a href="#tags">GSP Tags</a>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="error">&lt;</span>%@ page import=&quot;java.awt.*&quot; %<span class="error">&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>GSP also supports the contentType directive:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="error">&lt;</span>%@ page contentType=&quot;application/json&quot; %<span class="error">&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>The contentType directive allows using GSP to render other formats.</p>
</div>

<a name="7.2.1.4 Expressions"><!-- Legacy link --></a>
<h2 id="expressions">8.2.1.4 Expressions</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/GSPBasics/expressions.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>In GSP the <code>&lt;%= %&gt;</code> syntax introduced earlier is rarely used due to the support for GSP expressions. A GSP expression is similar to a JSP EL expression or a Groovy GString and takes the form <code>${expr}</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;html&gt;</span>
  <span class="tag">&lt;body&gt;</span>
    Hello ${params.name}
  <span class="tag">&lt;/body&gt;</span>
<span class="tag">&lt;/html&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>However, unlike JSP EL you can have any Groovy expression within the <code>${..}</code> block.</p>
</div>
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
Embedding data received from user input has the risk of making your application vulnerable to an Cross Site Scripting (XSS) attack. Please read the documentation on <a href="security.html#xssPrevention">XSS prevention</a> for information on how to prevent XSS attacks.
</td>
</tr>
</table>
</div>

<a name="7.2.2 GSP Tags"><!-- Legacy link --></a>
<h2 id="tags">8.2.2 GSP Tags</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/tags.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>Now that the less attractive JSP heritage has been set aside, the following sections cover GSP&#8217;s built-in tags, which are the preferred way to define GSP pages.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
The section on <a href="#taglibs">Tag Libraries</a> covers how to add your own custom tag libraries.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>All built-in GSP tags start with the prefix <code>g:</code>. Unlike JSP, you don&#8217;t specify any tag library imports. If a tag starts with <code>g:</code> it is automatically assumed to be a GSP tag. An example GSP tag would look like:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:example</span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>GSP tags can also have a body such as:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:example&gt;</span>
   Hello world
<span class="tag">&lt;/g:example&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Expressions can be passed into GSP tag attributes, if an expression is not used it will be assumed to be a String value:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:example</span> <span class="attribute-name">attr</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${new Date()}</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
   Hello world
<span class="tag">&lt;/g:example&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Maps can also be passed into GSP tag attributes, which are often used for a named parameter style syntax:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:example</span> <span class="attribute-name">attr</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${new Date()}</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">attr2</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">[one:1, two:2, three:3]</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
   Hello world
<span class="tag">&lt;/g:example&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Note that within the values of attributes you must use single quotes for Strings:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:example</span> <span class="attribute-name">attr</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${new Date()}</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">attr2</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">[one:'one', two:'two']</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
   Hello world
<span class="tag">&lt;/g:example&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>With the basic syntax out the way, the next sections look at the tags that are built into Grails by default.</p>
</div>


<h2 id="tagVariablesAndScopes">8.2.2.1 Variables and Scopes</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/tags/tagVariablesAndScopes.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>Variables can be defined within a GSP using the <a href="../ref/Tags/set.html">set</a> tag:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:set</span> <span class="attribute-name">var</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">now</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">value</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${new Date()}</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Here we assign a variable called <code>now</code> to the result of a GSP expression (which simply constructs a new <code>java.util.Date</code> instance). You can also use the body of the <code>&lt;g:set&gt;</code> tag to define a variable:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:set</span> <span class="attribute-name">var</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">myHTML</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
   Some re-usable code on: ${new Date()}
<span class="tag">&lt;/g:set&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>The assigned value can also be a bean from the applicationContext:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:set</span> <span class="attribute-name">var</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">bookService</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">bean</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">bookService</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Variables can also be placed in one of the following scopes:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>page</code> - Scoped to the current page (default)</p>
</li>
<li>
<p><code>request</code> - Scoped to the current request</p>
</li>
<li>
<p><code>flash</code> - Placed within <a href="../ref/Controllers/flash.html">flash</a> scope and hence available for the next request</p>
</li>
<li>
<p><code>session</code> - Scoped for the user session</p>
</li>
<li>
<p><code>application</code> - Application-wide scope.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>To specify the scope, use the <code>scope</code> attribute:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:set</span> <span class="attribute-name">var</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">now</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">value</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${new Date()}</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">scope</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">request</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>


<h2 id="tagLogicAndIteration">8.2.2.2 Logic and Iteration</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/tags/tagLogicAndIteration.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>GSP also supports logical and iterative tags out of the box. For logic there are <a href="../ref/Tags/if.html">if</a>, <a href="../ref/Tags/else.html">else</a> and <a href="../ref/Tags/elseif.html">elseif</a> tags for use with branching:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:if</span> <span class="attribute-name">test</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${session.role == 'admin'}</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
   <span class="error">&lt;</span>%-- show administrative functions --%<span class="error">&gt;</span>
<span class="tag">&lt;/g:if&gt;</span>
<span class="tag">&lt;g:else&gt;</span>
   <span class="error">&lt;</span>%-- show basic functions --%<span class="error">&gt;</span>
<span class="tag">&lt;/g:else&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Use the <a href="../ref/Tags/each.html">each</a> and <a href="../ref/Tags/while.html">while</a> tags for iteration:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:each</span> <span class="attribute-name">in</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${[1,2,3]}</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">var</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">num</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
   <span class="tag">&lt;p&gt;</span>Number ${num}<span class="tag">&lt;/p&gt;</span>
<span class="tag">&lt;/g:each&gt;</span>

<span class="tag">&lt;g:set</span> <span class="attribute-name">var</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">num</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">value</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${1}</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span>
<span class="tag">&lt;g:while</span> <span class="attribute-name">test</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${num &lt; 5 }</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
    <span class="tag">&lt;p&gt;</span>Number ${num++}<span class="tag">&lt;/p&gt;</span>
<span class="tag">&lt;/g:while&gt;</span></code></pre>
</div>
</div>

<a name="7.2.2.3 Search and Filtering"><!-- Legacy link --></a>
<h2 id="searchAndFiltering">8.2.2.3 Search and Filtering</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/tags/searchAndFiltering.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>If you have collections of objects you often need to sort and filter them. Use the <a href="../ref/Tags/findAll.html">findAll</a> and <a href="../ref/Tags/grep.html">grep</a> tags for these tasks:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml">Stephen King's Books:
<span class="tag">&lt;g:findAll</span> <span class="attribute-name">in</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${books}</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">expr</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">it.author == 'Stephen King'</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
     <span class="tag">&lt;p&gt;</span>Title: ${it.title}<span class="tag">&lt;/p&gt;</span>
<span class="tag">&lt;/g:findAll&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>The <code>expr</code> attribute contains a Groovy expression that can be used as a filter. The <a href="../ref/Tags/grep.html">grep</a> tag does a similar job, for example filtering by class:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:grep</span> <span class="attribute-name">in</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${books}</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">filter</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">NonFictionBooks.class</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
     <span class="tag">&lt;p&gt;</span>Title: ${it.title}<span class="tag">&lt;/p&gt;</span>
<span class="tag">&lt;/g:grep&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Or using a regular expression:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:grep</span> <span class="attribute-name">in</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${books.title}</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">filter</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">~/.*?Groovy.*?/</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
     <span class="tag">&lt;p&gt;</span>Title: ${it}<span class="tag">&lt;/p&gt;</span>
<span class="tag">&lt;/g:grep&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>The above example is also interesting due to its usage of GPath. GPath is an XPath-like language in Groovy. The <code>books</code> variable is a collection of <code>Book</code> instances. Since each <code>Book</code> has a <code>title</code>, you can obtain a list of Book titles using the expression <code>books.title</code>. Groovy will auto-magically iterate the collection, obtain each title, and return a new list!</p>
</div>

<a name="7.2.2.4 Links and Resources"><!-- Legacy link --></a>
<h2 id="linksAndResources">8.2.2.4 Links and Resources</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/tags/linksAndResources.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>GSP also features tags to help you manage linking to controllers and actions. The <a href="../ref/Tags/link.html">link</a> tag lets you specify controller and action name pairing and it will automatically work out the link based on the <a href="#urlmappings">URL Mappings</a>, even if you change them! For example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:link</span> <span class="attribute-name">action</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">show</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">1</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Book 1<span class="tag">&lt;/g:link&gt;</span>

<span class="tag">&lt;g:link</span> <span class="attribute-name">action</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">show</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${currentBook.id}</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>${currentBook.name}<span class="tag">&lt;/g:link&gt;</span>

<span class="tag">&lt;g:link</span> <span class="attribute-name">controller</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">book</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Book Home<span class="tag">&lt;/g:link&gt;</span>

<span class="tag">&lt;g:link</span> <span class="attribute-name">controller</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">book</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">action</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">list</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Book List<span class="tag">&lt;/g:link&gt;</span>

<span class="tag">&lt;g:link</span> <span class="attribute-name">url</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">[action: 'list', controller: 'book']</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Book List<span class="tag">&lt;/g:link&gt;</span>

<span class="tag">&lt;g:link</span> <span class="attribute-name">params</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">[sort: 'title', order: 'asc', author: currentBook.author]</span><span class="delimiter">&quot;</span></span>
        <span class="attribute-name">action</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">list</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Book List<span class="tag">&lt;/g:link&gt;</span></code></pre>
</div>
</div>

<a name="7.2.2.5 Forms and Fields"><!-- Legacy link --></a>
<h2 id="formsAndFields">8.2.2.5 Forms and Fields</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/tags/formsAndFields.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="sect3">
<h4 id="_form_basics">Form Basics</h4>
<div class="paragraph">
<p>GSP supports many different tags for working with HTML forms and fields, the most basic of which is the <a href="../ref/Tags/form.html">form</a> tag. This is a controller/action aware version of the regular HTML form tag. The <code>url</code> attribute lets you specify which controller and action to map to:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:form</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">myForm</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">url</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">[controller:'book',action:'list']</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>...<span class="tag">&lt;/g:form&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>In this case we create a form called <code>myForm</code> that submits to the <code>BookController&#8217;s `list</code> action. Beyond that all of the usual HTML attributes apply.</p>
</div>
</div>
<div class="sect3">
<h4 id="_form_fields">Form Fields</h4>
<div class="paragraph">
<p>In addition to easy construction of forms, GSP supports custom tags for dealing with different types of fields, including:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="../ref/Tags/textField.html">textField</a> - For input fields of type 'text'</p>
</li>
<li>
<p><a href="../ref/Tags/passwordField.html">passwordField</a> - For input fields of type 'password'</p>
</li>
<li>
<p><a href="../ref/Tags/checkBox.html">checkBox</a> - For input fields of type 'checkbox'</p>
</li>
<li>
<p><a href="../ref/Tags/radio.html">radio</a> - For input fields of type 'radio'</p>
</li>
<li>
<p><a href="../ref/Tags/hiddenField.html">hiddenField</a> - For input fields of type 'hidden'</p>
</li>
<li>
<p><a href="../ref/Tags/select.html">select</a> - For dealing with HTML select boxes</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Each of these allows GSP expressions for the value:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:textField</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">myField</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">value</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${myValue}</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>GSP also contains extended helper versions of the above tags such as <a href="../ref/Tags/radioGroup.html">radioGroup</a> (for creating groups of <a href="../ref/Tags/radio.html">radio</a> tags), <a href="../ref/Tags/localeSelect.html">localeSelect</a>, <a href="../ref/Tags/currencySelect.html">currencySelect</a> and <a href="../ref/Tags/timeZoneSelect.html">timeZoneSelect</a> (for selecting locales, currencies and time zones respectively).</p>
</div>
</div>
<div class="sect3">
<h4 id="_multiple_submit_buttons">Multiple Submit Buttons</h4>
<div class="paragraph">
<p>The age old problem of dealing with multiple submit buttons is also handled elegantly with Grails using the <a href="../ref/Tags/actionSubmit.html">actionSubmit</a> tag. It is just like a regular submit, but lets you specify an alternative action to submit to:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:actionSubmit</span> <span class="attribute-name">value</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">Some update label</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">action</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">update</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
</div>

<a name="7.2.2.6 Tags as Method Calls"><!-- Legacy link --></a>
<h2 id="tagsAsMethodCalls">8.2.2.6 Tags as Method Calls</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/tags/tagsAsMethodCalls.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>One major difference between GSP tags and other tagging technologies is that GSP tags can be called as either regular tags or as method calls from <a href="#controllers">controllers</a>, <a href="#taglibs">tag libraries</a> or GSP views.</p>
</div>
<div class="sect3">
<h4 id="_tags_as_method_calls_from_gsps">Tags as method calls from GSPs</h4>
<div class="paragraph">
<p>Tags return their results as a String-like object (a <code>StreamCharBuffer</code> which has all of the same methods as String) instead of writing directly to the response when called as methods. For example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml">Static Resource: ${createLinkTo(dir: &quot;images&quot;, file: &quot;logo.jpg&quot;)}</code></pre>
</div>
</div>
<div class="paragraph">
<p>This is particularly useful for using a tag within an attribute:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;img</span> <span class="attribute-name">src</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${createLinkTo(dir: 'images', file: 'logo.jpg')}</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>In view technologies that don&#8217;t support this feature you have to nest tags within tags, which becomes messy quickly and often has an adverse effect of WYSIWYG tools such as Dreamweaver that attempt to render the mark-up as it is not well-formed:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;img</span> <span class="attribute-name">src</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">&lt;g:createLinkTo dir=</span><span class="delimiter">&quot;</span></span><span class="attribute-name">images</span><span class="error">&quot;</span> <span class="attribute-name">file</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">logo.jpg</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span>&quot; /<span class="error">&gt;</span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_tags_as_method_calls_from_controllers_and_tag_libraries">Tags as method calls from Controllers and Tag Libraries</h4>
<div class="paragraph">
<p>You can also invoke tags from controllers and tag libraries. Tags within the default <code>g:</code> <a href="#namespaces">namespace</a> can be invoked without the prefix and a <code>StreamCharBuffer</code> result is returned:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">def</span> imageLocation = createLinkTo(<span class="key">dir</span>:<span class="string"><span class="delimiter">&quot;</span><span class="content">images</span><span class="delimiter">&quot;</span></span>, <span class="key">file</span>:<span class="string"><span class="delimiter">&quot;</span><span class="content">logo.jpg</span><span class="delimiter">&quot;</span></span>).toString()</code></pre>
</div>
</div>
<div class="paragraph">
<p>Prefix the namespace to avoid naming conflicts:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">def</span> imageLocation = g.createLinkTo(<span class="key">dir</span>:<span class="string"><span class="delimiter">&quot;</span><span class="content">images</span><span class="delimiter">&quot;</span></span>, <span class="key">file</span>:<span class="string"><span class="delimiter">&quot;</span><span class="content">logo.jpg</span><span class="delimiter">&quot;</span></span>).toString()</code></pre>
</div>
</div>
<div class="paragraph">
<p>For tags that use a <a href="#namespaces">custom namespace</a>, use that prefix for the method call. For example (from the <a href="http://grails.org/plugin/fckeditor">FCK Editor plugin</a>):</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">def</span> editor = fckeditor.editor(<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">text</span><span class="delimiter">&quot;</span></span>, <span class="key">width</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">100%</span><span class="delimiter">&quot;</span></span>, <span class="key">height</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">400</span><span class="delimiter">&quot;</span></span>)</code></pre>
</div>
</div>
</div>

<a name="7.2.3 Views and Templates"><!-- Legacy link --></a>
<h2 id="viewsAndTemplates">8.2.3 Views and Templates</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/viewsAndTemplates.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>Grails also has the concept of templates. These are useful for partitioning your views into maintainable chunks, and combined with <a href="#layouts">Layouts</a> provide a highly re-usable mechanism for structured views.</p>
</div>
<div class="sect3">
<h4 id="_template_basics">Template Basics</h4>
<div class="paragraph">
<p>Grails uses the convention of placing an underscore before the name of a view to identify it as a template. For example, you might have a template that renders Books located at <code>grails-app/views/book/_bookTemplate.gsp</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">book</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${book?.id}</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
   <span class="tag">&lt;div&gt;</span>Title: ${book?.title}<span class="tag">&lt;/div&gt;</span>
   <span class="tag">&lt;div&gt;</span>Author: ${book?.author?.name}<span class="tag">&lt;/div&gt;</span>
<span class="tag">&lt;/div&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Use the <a href="../ref/Tags/render.html">render</a> tag to render this template from one of the views in <code>grails-app/views/book</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:render</span> <span class="attribute-name">template</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">bookTemplate</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">model</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">[book: myBook]</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Notice how we pass into a model to use using the <code>model</code> attribute of the <code>render</code> tag. If you have multiple <code>Book</code> instances you can also render the template for each <code>Book</code> using the render tag with a <code>collection</code> attribute:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:render</span> <span class="attribute-name">template</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">bookTemplate</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">var</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">book</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">collection</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${bookList}</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_shared_templates">Shared Templates</h4>
<div class="paragraph">
<p>In the previous example we had a template that was specific to the <code>BookController</code> and its views at <code>grails-app/views/book</code>. However, you may want to share templates across your application.</p>
</div>
<div class="paragraph">
<p>In this case you can place them in the root views directory at grails-app/views or any subdirectory below that location, and then with the template attribute use an absolute location starting with <code>/</code> instead of a relative location. For example if you had a template called <code>grails-app/views/shared/_mySharedTemplate.gsp</code>, you would reference it as:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:render</span> <span class="attribute-name">template</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">/shared/mySharedTemplate</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>You can also use this technique to reference templates in any directory from any view or controller:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:render</span> <span class="attribute-name">template</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">/book/bookTemplate</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">model</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">[book: myBook]</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_the_template_namespace">The Template Namespace</h4>
<div class="paragraph">
<p>Since templates are used so frequently there is template namespace, called <code>tmpl</code>, available that makes using templates easier. Consider for example the following usage pattern:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:render</span> <span class="attribute-name">template</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">bookTemplate</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">model</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">[book:myBook]</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>This can be expressed with the <code>tmpl</code> namespace as follows:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;tmpl:bookTemplate</span> <span class="attribute-name">book</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${myBook}</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_templates_in_controllers_and_tag_libraries">Templates in Controllers and Tag Libraries</h4>
<div class="paragraph">
<p>You can also render templates from controllers using the <a href="../ref/Controllers/render.html">render</a> controller method. This is useful for JavaScript heavy applications where you generate small HTML or data responses to partially update the current page instead of performing new request:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">def</span> <span class="function">bookData</span>() {
    <span class="keyword">def</span> b = <span class="predefined-type">Book</span>.get(params.id)
    render(<span class="key">template</span>:<span class="string"><span class="delimiter">&quot;</span><span class="content">bookTemplate</span><span class="delimiter">&quot;</span></span>, <span class="key">model</span>:[<span class="key">book</span>:b])
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>The <a href="../ref/Controllers/render.html">render</a> controller method writes directly to the response, which is the most common behaviour. To instead obtain the result of template as a String you can use the <a href="../ref/Tags/render.html">render</a> tag:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">def</span> <span class="function">bookData</span>() {
    <span class="keyword">def</span> b = <span class="predefined-type">Book</span>.get(params.id)
    <span class="predefined-type">String</span> content = g.render(<span class="key">template</span>:<span class="string"><span class="delimiter">&quot;</span><span class="content">bookTemplate</span><span class="delimiter">&quot;</span></span>, <span class="key">model</span>:[<span class="key">book</span>:b])
    render content
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Notice the usage of the <code>g</code> namespace which tells Grails we want to use the <a href="#tagsAsMethodCalls">tag as method call</a> instead of the <a href="../ref/Controllers/render.html">render</a> method.</p>
</div>
</div>

<a name="7.2.4 Layouts with Sitemesh"><!-- Legacy link --></a>
<h2 id="layouts">8.2.4 Layouts with Sitemesh</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/layouts.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="sect3">
<h4 id="_creating_layouts">Creating Layouts</h4>
<div class="paragraph">
<p>Grails leverages <a href="http://sitemesh.org">Sitemesh</a>, a decorator engine, to support view layouts. Layouts are located in the <code>grails-app/views/layouts</code> directory. A typical layout can be seen below:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;html&gt;</span>
    <span class="tag">&lt;head&gt;</span>
        <span class="tag">&lt;title&gt;</span><span class="tag">&lt;g:layoutTitle</span> <span class="attribute-name">default</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">An example decorator</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span><span class="tag">&lt;/title&gt;</span>
        <span class="tag">&lt;g:layoutHead</span> <span class="tag">/&gt;</span>
    <span class="tag">&lt;/head&gt;</span>
    <span class="tag">&lt;body</span> <span class="attribute-name">onload</span>=<span class="string"><span class="delimiter">&quot;</span><span class="predefined">$</span>{pageProperty(name:<span class="string"><span class="delimiter">'</span><span class="content">body.onload</span><span class="delimiter">'</span></span>)}<span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
        <span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">menu</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span><span class="comment">&lt;!--my common menu goes here--&gt;</span><span class="tag">&lt;/div&gt;</span>
        <span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">body</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
            <span class="tag">&lt;g:layoutBody</span> <span class="tag">/&gt;</span>
        <span class="tag">&lt;/div&gt;</span>
    <span class="tag">&lt;/body&gt;</span>
<span class="tag">&lt;/html&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>The key elements are the <a href="../ref/Tags/layoutHead.html">layoutHead</a>, <a href="../ref/Tags/layoutTitle.html">layoutTitle</a> and <a href="../ref/Tags/layoutBody.html">layoutBody</a> tag invocations:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>layoutTitle</code> - outputs the target page&#8217;s title</p>
</li>
<li>
<p><code>layoutHead</code> - outputs the target page&#8217;s head tag contents</p>
</li>
<li>
<p><code>layoutBody</code> - outputs the target page&#8217;s body tag contents</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>The previous example also demonstrates the <a href="../ref/Tags/pageProperty.html">pageProperty</a> tag which can be used to inspect and return aspects of the target page.</p>
</div>
</div>
<div class="sect3">
<h4 id="_triggering_layouts">Triggering Layouts</h4>
<div class="paragraph">
<p>There are a few ways to trigger a layout. The simplest is to add a meta tag to the view:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;html&gt;</span>
    <span class="tag">&lt;head&gt;</span>
        <span class="tag">&lt;title&gt;</span>An Example Page<span class="tag">&lt;/title&gt;</span>
        <span class="tag">&lt;meta</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">layout</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">content</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">main</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span>
    <span class="tag">&lt;/head&gt;</span>
    <span class="tag">&lt;body&gt;</span>This is my content!<span class="tag">&lt;/body&gt;</span>
<span class="tag">&lt;/html&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>In this case a layout called <code>grails-app/views/layouts/main.gsp</code> will be used to layout the page. If we were to use the layout from the previous section the output would resemble this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;html&gt;</span>
    <span class="tag">&lt;head&gt;</span>
        <span class="tag">&lt;title&gt;</span>An Example Page<span class="tag">&lt;/title&gt;</span>
    <span class="tag">&lt;/head&gt;</span>
    <span class="tag">&lt;body</span> <span class="attribute-name">onload</span>=<span class="string"><span class="delimiter">&quot;</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
        <span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">menu</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span><span class="comment">&lt;!--my common menu goes here--&gt;</span><span class="tag">&lt;/div&gt;</span>
        <span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">body</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
            This is my content!
        <span class="tag">&lt;/div&gt;</span>
    <span class="tag">&lt;/body&gt;</span>
<span class="tag">&lt;/html&gt;</span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_specifying_a_layout_in_a_controller">Specifying A Layout In A Controller</h4>
<div class="paragraph">
<p>Another way to specify a layout is to specify the name of the layout by assigning a value to the "layout" property in a controller. For example, if you have a controller such as:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="type">class</span> <span class="class">BookController</span> {
    <span class="directive">static</span> layout = <span class="string"><span class="delimiter">'</span><span class="content">customer</span><span class="delimiter">'</span></span>

    <span class="keyword">def</span> <span class="function">list</span>() { ... }
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>You can create a layout called <code>grails-app/views/layouts/customer.gsp</code> which will be applied to all views that the <code>BookController</code> delegates to.  The value of the "layout" property may contain a directory structure relative to the <code>grails-app/views/layouts/</code> directory.  For example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="type">class</span> <span class="class">BookController</span> {
    <span class="directive">static</span> layout = <span class="string"><span class="delimiter">'</span><span class="content">custom/customer</span><span class="delimiter">'</span></span>

    <span class="keyword">def</span> <span class="function">list</span>() { ... }
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Views rendered from that controller would be decorated with the <code>grails-app/views/layouts/custom/customer.gsp</code> template.</p>
</div>
</div>
<div class="sect3">
<h4 id="_layout_by_convention">Layout by Convention</h4>
<div class="paragraph">
<p>Another way to associate layouts is to use "layout by convention". For example, if you have this controller:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="type">class</span> <span class="class">BookController</span> {
    <span class="keyword">def</span> <span class="function">list</span>() { ... }
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>You can create a layout called <code>grails-app/views/layouts/book.gsp</code>, which will be applied to all views that the <code>BookController</code> delegates to.</p>
</div>
<div class="paragraph">
<p>Alternatively, you can create a layout called <code>grails-app/views/layouts/book/list.gsp</code> which will only be applied to the <code>list</code> action within the <code>BookController</code>.</p>
</div>
<div class="paragraph">
<p>If you have both the above mentioned layouts in place the layout specific to the action will take precedence when the list action is executed.</p>
</div>
<div class="paragraph">
<p>If a layout may not be located using any of those conventions, the convention of last resort is to look for the application default layout which
is <code>grails-app/views/layouts/application.gsp</code>.  The name of the application default layout may be changed by defining a property
in <code>grails-app/conf/application.groovy</code> as follows:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">grails.sitemesh.default.layout = <span class="string"><span class="delimiter">'</span><span class="content">myLayoutName</span><span class="delimiter">'</span></span></code></pre>
</div>
</div>
<div class="paragraph">
<p>With that property in place, the application default layout will be <code>grails-app/views/layouts/myLayoutName.gsp</code>.</p>
</div>
</div>
<div class="sect3">
<h4 id="_inline_layouts">Inline Layouts</h4>
<div class="paragraph">
<p>Grails' also supports Sitemesh&#8217;s concept of inline layouts with the <a href="../ref/Tags/applyLayout.html">applyLayout</a> tag. This can be used to apply a layout to a template, URL or arbitrary section of content. This lets you even further modularize your view structure by "decorating" your template includes.</p>
</div>
<div class="paragraph">
<p>Some examples of usage can be seen below:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:applyLayout</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">myLayout</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">template</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">bookTemplate</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">collection</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">${books}</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span>

<span class="tag">&lt;g:applyLayout</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">myLayout</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">url</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">http://www.google.com</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span>

<span class="tag">&lt;g:applyLayout</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">myLayout</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
The content to apply a layout to
<span class="tag">&lt;/g:applyLayout&gt;</span></code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_server_side_includes">Server-Side Includes</h4>
<div class="paragraph">
<p>While the <a href="../ref/Tags/applyLayout.html">applyLayout</a> tag is useful for applying layouts to external content, if you simply want to include external content in the current page you use the <a href="../ref/Tags/include.html">include</a> tag:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:include</span> <span class="attribute-name">controller</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">book</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">action</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">list</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>You can even combine the <a href="../ref/Tags/include.html">include</a> tag and the <a href="../ref/Tags/applyLayout.html">applyLayout</a> tag for added flexibility:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;g:applyLayout</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">myLayout</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
   <span class="tag">&lt;g:include</span> <span class="attribute-name">controller</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">book</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">action</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">list</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span>
<span class="tag">&lt;/g:applyLayout&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Finally, you can also call the <a href="../ref/Tags/include.html">include</a> tag from a controller or tag library as a method:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">def</span> content = include(<span class="key">controller</span>:<span class="string"><span class="delimiter">&quot;</span><span class="content">book</span><span class="delimiter">&quot;</span></span>, <span class="key">action</span>:<span class="string"><span class="delimiter">&quot;</span><span class="content">list</span><span class="delimiter">&quot;</span></span>)</code></pre>
</div>
</div>
<div class="paragraph">
<p>The resulting content will be provided via the return value of the <a href="../ref/Tags/include.html">include</a> tag.</p>
</div>
</div>

<a name="7.2.5 Static Resources"><!-- Legacy link --></a>
<h2 id="resources">8.2.5 Static Resources</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/resources.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>Grails 3 integrates with the <a href="http://grails.org/plugins.html#plugin/asset-pipeline">Asset Pipeline plugin</a> to provide sophisticated static asset management. This plugin is installed by default in new Grails applications.</p>
</div>
<div class="paragraph">
<p>The basic way to include a link to a static asset in your application is to use the <a href="../ref/Tags/resource.html">resource</a> tag. This simple approach creates a URI pointing to the file.</p>
</div>
<div class="paragraph">
<p>However modern applications with dependencies on multiple JavaScript and CSS libraries and frameworks (as well as dependencies on multiple Grails plugins) require something more powerful.</p>
</div>
<div class="paragraph">
<p>The issues that the Asset-Pipeline plugin tackles are:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Reduced Dependence - The plugin has compression, minification, and cache-digests built in.</p>
</li>
<li>
<p>Easy Debugging - Makes for easy debugging by keeping files separate in development mode.</p>
</li>
<li>
<p>Asset Bundling using require <a href="http://www.asset-pipeline.com/manual/#directives">directives</a>.</p>
</li>
<li>
<p>Web application performance tuning is difficult.</p>
</li>
<li>
<p>The need for a standard way to expose static assets in plugins and applications.</p>
</li>
<li>
<p>The need for extensible processing to make languages like LESS or Coffee first class citizens.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>The asset-pipeline allows you to define your javascript or css requirements right at the top of the file and they get compiled on War creation.</p>
</div>
<div class="paragraph">
<p>Take a look at the <a href="http://www.asset-pipeline.com/manual">documentation</a> for the asset-pipeline to get started.</p>
</div>
<div class="paragraph">
<p>If you do not want to use the Asset-Pipeline plugin, you can serve the static assets from directories <code>src/main/resources/public</code> or <code>src/main/webapp</code>, but the latter one only gets included in WAR packaging but not in JAR packaging.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
Static resources located in <code>src/main/resources/public</code> or <code>src/main/webapp</code> are resolved under the <code>/static/**</code> URI by default. You can change the URI pattern with the following configuration:
</td>
</tr>
</table>
</div>
<div class="listingblock">
<div class="title">grails-app/conf/application.yml</div>
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yml"><span class="key">grails.resources.pattern</span>: <span class="string"><span class="content">/**</span></span></code></pre>
</div>
</div>

<a name="7.2.6 Sitemesh Content Blocks"><!-- Legacy link --></a>
<h2 id="sitemeshContentBlocks">8.2.6 Sitemesh Content Blocks</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/sitemeshContentBlocks.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>Although it is useful to decorate an entire page sometimes you may find the need to decorate independent sections of your site. To do this you can use content blocks. To get started, partition the page to be decorated using the <code>&lt;content&gt;</code> tag:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;content</span> <span class="attribute-name">tag</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">navbar</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
... draw the navbar here...
<span class="tag">&lt;/content&gt;</span>

<span class="tag">&lt;content</span> <span class="attribute-name">tag</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">header</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
... draw the header here...
<span class="tag">&lt;/content&gt;</span>

<span class="tag">&lt;content</span> <span class="attribute-name">tag</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">footer</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
... draw the footer here...
<span class="tag">&lt;/content&gt;</span>

<span class="tag">&lt;content</span> <span class="attribute-name">tag</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">body</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
... draw the body here...
<span class="tag">&lt;/content&gt;</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Then within the layout you can reference these components and apply individual layouts to each:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;html&gt;</span>
    <span class="tag">&lt;body&gt;</span>
        <span class="tag">&lt;div</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">header</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
            <span class="tag">&lt;g:applyLayout</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">headerLayout</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
                <span class="tag">&lt;g:pageProperty</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">page.header</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span>
            <span class="tag">&lt;/g:applyLayout&gt;</span>
        <span class="tag">&lt;/div&gt;</span>
        <span class="tag">&lt;div</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">nav</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
            <span class="tag">&lt;g:applyLayout</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">navLayout</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
                <span class="tag">&lt;g:pageProperty</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">page.navbar</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span>
            <span class="tag">&lt;/g:applyLayout&gt;</span>
        <span class="tag">&lt;/div&gt;</span>
        <span class="tag">&lt;div</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">body</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
            <span class="tag">&lt;g:applyLayout</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">bodyLayout</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
                <span class="tag">&lt;g:pageProperty</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">page.body</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span>
            <span class="tag">&lt;/g:applyLayout&gt;</span>
        <span class="tag">&lt;/div&gt;</span>
        <span class="tag">&lt;div</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">footer</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
            <span class="tag">&lt;g:applyLayout</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">footerLayout</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
                <span class="tag">&lt;g:pageProperty</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">page.footer</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span>
            <span class="tag">&lt;/g:applyLayout&gt;</span>
        <span class="tag">&lt;/div&gt;</span>
    <span class="tag">&lt;/body&gt;</span>
<span class="tag">&lt;/html&gt;</span></code></pre>
</div>
</div>

<a name="7.2.7 Making Changes to a Deployed Application"><!-- Legacy link --></a>
<h2 id="makingChangesToADeployedApplication">8.2.7 Making Changes to a Deployed Application</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/makingChangesToADeployedApplication.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="paragraph">
<p>One of the main issues with deploying a Grails application (or typically any servlet-based one) is that any change to the views requires that you redeploy your whole application. If all you want to do is fix a typo on a page, or change an image link, it can seem like a lot of unnecessary work. For such simple requirements, Grails does have a solution: the  <code>grails.gsp.view.dir</code>  configuration setting.</p>
</div>
<div class="paragraph">
<p>How does this work? The first step is to decide where the GSP files should go. Let&#8217;s say we want to keep them unpacked in a  <code>/var/www/grails/my-app</code>  directory. We add these two lines to  <code>grails-app/conf/application.groovy</code> :</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">grails.gsp.enable.reload = <span class="predefined-constant">true</span>
grails.gsp.view.dir = <span class="string"><span class="delimiter">&quot;</span><span class="content">/var/www/grails/my-app/</span><span class="delimiter">&quot;</span></span></code></pre>
</div>
</div>
<div class="paragraph">
<p>The first line tells Grails that modified GSP files should be reloaded at runtime. If you don&#8217;t have this setting, you can make as many changes as you like but they won&#8217;t be reflected in the running application until you restart. The second line tells Grails where to load the views and layouts from.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
The trailing slash on the  <code>grails.gsp.view.dir</code>  value is important! Without it, Grails will look for views in the parent directory.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>Setting "grails.gsp.view.dir" is optional. If it&#8217;s not specified, you can update files directly to the application server&#8217;s deployed war directory. Depending on the application server, these files might get overwritten when the server is restarted. Most application servers support "exploded war deployment" which is recommended in this case.</p>
</div>
<div class="paragraph">
<p>With those settings in place, all you need to do is copy the views from your web application to the external directory. On a Unix-like system, this would look something like this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">mkdir -p /var/www/grails/my-app/grails-app/views
cp -R grails-app/views<span class="comment">/* /var/www/grails/my-app/grails-app/views</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>The key point here is that you must retain the view directory structure, including the  <code>grails-app/views</code>  bit. So you end up with the path  <code>/var/www/grails/my-app/grails-app/views/&#8230;&#8203;</code> .</p>
</div>
<div class="paragraph">
<p>One thing to bear in mind with this technique is that every time you modify a GSP, it uses up permgen space. So at some point you will eventually hit "out of permgen space" errors unless you restart the server. So this technique is not recommended for frequent or large changes to the views.</p>
</div>
<div class="paragraph">
<p>There are also some System properties to control GSP reloading:</p>
</div>
<table class="tableblock frame-all grid-all spread">
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top"><strong>Name</strong></th>
<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
<th class="tableblock halign-left valign-top"><strong>Default</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">grails.gsp.enable.reload</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">alternative system property for enabling the GSP reload mode without changing <code>application.groovy</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">grails.gsp.reload.interval</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">interval between checking the lastmodified time of the gsp source file</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">unit is milliseconds</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">5000</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">grails.gsp.reload.granularity</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">the number of milliseconds leeway to give before deciding a file is out of date. this is needed because different roundings usually cause a 1000ms difference in lastmodified times</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">1000</p></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>GSP reloading is supported for precompiled GSPs since Grails 1.3.5 .</p>
</div>

<a name="7.2.8 GSP Debugging"><!-- Legacy link --></a>
<h2 id="GSPDebugging">8.2.8 GSP Debugging</h2>

<div class='contribute-btn'>
    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/guide/theWebLayer/gsp/GSPDebugging.adoc"'>
        <i class='fa fa-pencil-square-o'></i> Improve this doc
    </button>
</div>


<div class="sect3">
<h4 id="_viewing_the_generated_source_code">Viewing the generated source code</h4>
<div class="ulist">
<ul>
<li>
<p>Adding "?showSource=true" or "&amp;showSource=true" to the url shows the generated Groovy source code for the view instead of rendering it. It won&#8217;t show the source code of included templates. This only works in development mode</p>
</li>
<li>
<p>The saving of all generated source code can be activated by setting the property "grails.views.gsp.keepgenerateddir" (in <code>application.groovy</code>) . It must point to a directory that exists and is writable.</p>
</li>
<li>
<p>During "grails war" gsp pre-compilation, the generated source code is stored in grails.project.work.dir/gspcompile (usually in ~/.grails/(grails_version)/projects/(project name)/gspcompile).</p>
</li>
</ul>
</div>
</div>
<div class="sect3">
<h4 id="_debugging_gsp_code_with_a_debugger">Debugging GSP code with a debugger</h4>
<div class="ulist">
<ul>
<li>
<p>See <a href="http://contraptionsforprogramming.blogspot.com/2010/08/debuggable-gsps-in-springsource-tool.html">Debugging GSP in STS</a></p>
</li>
</ul>
</div>
</div>
<div class="sect3">
<h4 id="_viewing_information_about_templates_used_to_render_a_single_url">Viewing information about templates used to render a single url</h4>
<div class="paragraph">
<p>GSP templates are reused in large web applications by using the <code>g:render</code> taglib. Several small templates can be used to render a single page.
It might be hard to find out what GSP template actually renders the html seen in the result.
The debug templates -feature adds html comments to the output. The comments contain debug information about gsp templates used to render the page.</p>
</div>
<div class="paragraph">
<p>Usage is simple: append "?debugTemplates" or "&amp;debugTemplates" to the url and view the source of the result in your browser.
"debugTemplates" is restricted to development mode. It won&#8217;t work in production.</p>
</div>
<div class="paragraph">
<p>Here is an example of comments added by debugTemplates :</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">&lt;!-- GSP <span class="error">#</span><span class="integer">2</span> START <span class="key">template</span>: <span class="regexp"><span class="delimiter">/</span><span class="content">home</span><span class="delimiter">/</span></span>...<span class="regexp"><span class="delimiter">/</span><span class="content">views</span><span class="delimiter">/</span></span>_carousel.gsp
     <span class="key">precompiled</span>: <span class="predefined-constant">false</span> <span class="key">lastmodified</span>: ... --&gt;
.
.
.
&lt;!-- GSP <span class="error">#</span><span class="integer">2</span> END <span class="key">template</span>: <span class="regexp"><span class="delimiter">/</span><span class="content">home</span><span class="delimiter">/</span></span>...<span class="regexp"><span class="delimiter">/</span><span class="content">views</span><span class="delimiter">/</span></span>_carousel.gsp
     rendering <span class="key">time</span>: <span class="integer">115</span> ms --&gt;</code></pre>
</div>
</div>
<div class="paragraph">
<p>Each comment block has a unique id so that you can find the start &amp; end of each template call.</p>
</div>
</div>


                <div style="clear:both;margin-top:15px;"></div>
                
                    <div class="toc-item prev-left"><a href="../../guide/GORM.html">&lt;&lt; <strong>7</strong><span>Object Relational Mapping (GORM)</span></a></div>
                
                    <div class="toc-item next-right"><a href="../../guide/traits.html"><strong>9</strong><span>Traits</span> >></a></div>
                
                <div style="clear:both"></div>
            </div>
        </td>
        <td id="col2">
            <div class="local clearfix">
                <div class="local-title">
                    <a href="../../guide/index.html" target="mainFrame">Quick Reference</a>
                    <span class="toggle">(<a href="#" onclick="localToggle(); return false;">hide</a>)</span>
                </div>
                <div class="menu">
                    
                    <div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Command Line</h1><div class="menu-sub">
                        
                            <div class="menu-item"><a href="../../ref/Command%20Line/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/bug-report.html">bug-report</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/clean.html">clean</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/compile.html">compile</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/console.html">console</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-app.html">create-app</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-command.html">create-command</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-controller.html">create-controller</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-domain-class.html">create-domain-class</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-functional-test.html">create-functional-test</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-hibernate-cfg-xml.html">create-hibernate-cfg-xml</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-integration-test.html">create-integration-test</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-interceptor.html">create-interceptor</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-plugin.html">create-plugin</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-profile.html">create-profile</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-script.html">create-script</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-service.html">create-service</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-taglib.html">create-taglib</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-unit-test.html">create-unit-test</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/dependency-report.html">dependency-report</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/docs.html">docs</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/generate-all.html">generate-all</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/generate-controller.html">generate-controller</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/generate-views.html">generate-views</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/help.html">help</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/install-templates.html">install-templates</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/list-plugins.html">list-plugins</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/list-profiles.html">list-profiles</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/package-plugin.html">package-plugin</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/package.html">package</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/plugin-info.html">plugin-info</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/profile-info.html">profile-info</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/run-app.html">run-app</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/run-command.html">run-command</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/run-script.html">run-script</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/schema-export.html">schema-export</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/shell.html">shell</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/stats.html">stats</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/stop-app.html">stop-app</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/test-app.html">test-app</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/war.html">war</a>
                            </div>
                            
                            </div>
                    </div>
                    
                    <div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Constraints</h1><div class="menu-sub">
                        
                            <div class="menu-item"><a href="../../ref/Constraints/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Constraints/attributes.html">attributes</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/bindable.html">bindable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/blank.html">blank</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/creditCard.html">creditCard</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/email.html">email</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/inList.html">inList</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/matches.html">matches</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/max.html">max</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/maxSize.html">maxSize</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/min.html">min</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/minSize.html">minSize</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/notEqual.html">notEqual</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/nullable.html">nullable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/range.html">range</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/scale.html">scale</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/size.html">size</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/unique.html">unique</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/url.html">url</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/validator.html">validator</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/widget.html">widget</a>
                            </div>
                            
                            </div>
                    </div>
                    
                    <div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Controllers</h1><div class="menu-sub">
                        
                            <div class="menu-item"><a href="../../ref/Controllers/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Controllers/actionName.html">actionName</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/allowedMethods.html">allowedMethods</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/bindData.html">bindData</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/chain.html">chain</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/controllerName.html">controllerName</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/defaultAction.html">defaultAction</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/errors.html">errors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/flash.html">flash</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/forward.html">forward</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/grailsApplication.html">grailsApplication</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/hasErrors.html">hasErrors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/namespace.html">namespace</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/params.html">params</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/redirect.html">redirect</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/render.html">render</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/request.html">request</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/respond.html">respond</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/response.html">response</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/responseFormats.html">responseFormats</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/scope.html">scope</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/servletContext.html">servletContext</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/session.html">session</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/withForm.html">withForm</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/withFormat.html">withFormat</a>
                            </div>
                            
                            </div>
                    </div>
                    
                    <div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Database Mapping</h1><div class="menu-sub">
                        
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/autoImport.html">autoImport</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/autoTimestamp.html">autoTimestamp</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/batchSize.html">batchSize</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/cache.html">cache</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/cascade.html">cascade</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/column.html">column</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/comment.html">comment</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/discriminator.html">discriminator</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/dynamicInsert.html">dynamicInsert</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/dynamicUpdate.html">dynamicUpdate</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/fetch.html">fetch</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/id.html">id</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/ignoreNotFound.html">ignoreNotFound</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/indexColumn.html">indexColumn</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/insertable.html">insertable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/joinTable.html">joinTable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/lazy.html">lazy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/order.html">order</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/sort.html">sort</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/table.html">table</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/type.html">type</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/updateable.html">updateable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/version.html">version</a>
                            </div>
                            
                            </div>
                    </div>
                    
                    <div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Domain Classes</h1><div class="menu-sub">
                        
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/addTo.html">addTo</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/attach.html">attach</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/belongsTo.html">belongsTo</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/clearErrors.html">clearErrors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/constraints.html">constraints</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/count.html">count</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/countBy.html">countBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/createCriteria.html">createCriteria</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/delete.html">delete</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/discard.html">discard</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/embedded.html">embedded</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/errors.html">errors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/executeQuery.html">executeQuery</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/executeUpdate.html">executeUpdate</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/exists.html">exists</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/fetchMode.html">fetchMode</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/find.html">find</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findAll.html">findAll</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findAllBy.html">findAllBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findAllWhere.html">findAllWhere</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findBy.html">findBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findOrCreateBy.html">findOrCreateBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findOrCreateWhere.html">findOrCreateWhere</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findOrSaveBy.html">findOrSaveBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findOrSaveWhere.html">findOrSaveWhere</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findWhere.html">findWhere</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/first.html">first</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/get.html">get</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/getAll.html">getAll</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/getDirtyPropertyNames.html">getDirtyPropertyNames</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/getPersistentValue.html">getPersistentValue</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/hasErrors.html">hasErrors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/hasMany.html">hasMany</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/hasOne.html">hasOne</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/ident.html">ident</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/instanceOf.html">instanceOf</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/isAttached.html">isAttached</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/isDirty.html">isDirty</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/last.html">last</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/list.html">list</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/listOrderBy.html">listOrderBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/load.html">load</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/lock.html">lock</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/mapWith.html">mapWith</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/mappedBy.html">mappedBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/mapping.html">mapping</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/merge.html">merge</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/namedQueries.html">namedQueries</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/properties.html">properties</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/read.html">read</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/refresh.html">refresh</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/removeFrom.html">removeFrom</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/save.html">save</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/transients.html">transients</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/validate.html">validate</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/where.html">where</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/whereAny.html">whereAny</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/withCriteria.html">withCriteria</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/withNewSession.html">withNewSession</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/withSession.html">withSession</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/withTransaction.html">withTransaction</a>
                            </div>
                            
                            </div>
                    </div>
                    
                    <div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Plug-ins</h1><div class="menu-sub">
                        
                            <div class="menu-item"><a href="../../ref/Plug-ins/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/URL%20mappings.html">URL mappings</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/codecs.html">codecs</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/controllers.html">controllers</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/core.html">core</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/dataSource.html">dataSource</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/domainClasses.html">domainClasses</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/hibernate.html">hibernate</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/i18n.html">i18n</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/logging.html">logging</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/scaffolding.html">scaffolding</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/services.html">services</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/servlets.html">servlets</a>
                            </div>
                            
                            </div>
                    </div>
                    
                    <div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Services</h1><div class="menu-sub">
                        
                            <div class="menu-item"><a href="../../ref/Services/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Services/scope.html">scope</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Services/transactional.html">transactional</a>
                            </div>
                            
                            </div>
                    </div>
                    
                    <div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Servlet API</h1><div class="menu-sub">
                        
                            
                            <div class="menu-item"><a href="../../ref/Servlet%20API/request.html">request</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Servlet%20API/response.html">response</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Servlet%20API/servletContext.html">servletContext</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Servlet%20API/session.html">session</a>
                            </div>
                            
                            </div>
                    </div>
                    
                    <div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Tag Libraries</h1><div class="menu-sub">
                        
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/actionName.html">actionName</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/controllerName.html">controllerName</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/flash.html">flash</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/pageScope.html">pageScope</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/params.html">params</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/request.html">request</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/response.html">response</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/servletContext.html">servletContext</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/session.html">session</a>
                            </div>
                            
                            </div>
                    </div>
                    
                    <div class="menu-block"><h1 class="menu-title" onclick="toggleRef(this.parentNode.childNodes[1])">Tags</h1><div class="menu-sub">
                        
                            
                            <div class="menu-item"><a href="../../ref/Tags/actionSubmit.html">actionSubmit</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/actionSubmitImage.html">actionSubmitImage</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/applyLayout.html">applyLayout</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/checkBox.html">checkBox</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/collect.html">collect</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/cookie.html">cookie</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/country.html">country</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/countrySelect.html">countrySelect</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/createLink.html">createLink</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/createLinkTo.html">createLinkTo</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/currencySelect.html">currencySelect</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/datePicker.html">datePicker</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/each.html">each</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/eachError.html">eachError</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/else.html">else</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/elseif.html">elseif</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/external.html">external</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/field.html">field</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/fieldError.html">fieldError</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/fieldValue.html">fieldValue</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/findAll.html">findAll</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/form.html">form</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/formatBoolean.html">formatBoolean</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/formatDate.html">formatDate</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/formatNumber.html">formatNumber</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/grep.html">grep</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/hasErrors.html">hasErrors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/header.html">header</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/hiddenField.html">hiddenField</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/if.html">if</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/img.html">img</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/include.html">include</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/isAvailable.html">isAvailable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/isNotAvailable.html">isNotAvailable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/javascript.html">javascript</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/join.html">join</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/layoutBody.html">layoutBody</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/layoutHead.html">layoutHead</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/layoutTitle.html">layoutTitle</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/link.html">link</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/localeSelect.html">localeSelect</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/message.html">message</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/meta.html">meta</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/pageProperty.html">pageProperty</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/paginate.html">paginate</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/passwordField.html">passwordField</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/radio.html">radio</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/radioGroup.html">radioGroup</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/render.html">render</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/renderErrors.html">renderErrors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/resource.html">resource</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/select.html">select</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/set.html">set</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/sortableColumn.html">sortableColumn</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/submitButton.html">submitButton</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/textArea.html">textArea</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/textField.html">textField</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/timeZoneSelect.html">timeZoneSelect</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/unless.html">unless</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/uploadForm.html">uploadForm</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/while.html">while</a>
                            </div>
                            
                            </div>
                    </div>
                    
                </div>
            </div>
        </td>
    </tr>
</table>

<div id="footer">
    Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.
    
</div>

<script type="text/javascript" src="../js/docs.js"></script>

</body>
</html>
